# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=gnuplot
pkgver=5.4.3
pkgrel=0
pkgdesc="Utility for plotting graphs"
url="http://www.gnuplot.info/"
arch="all"
license="MIT"
makedepends="cairo-dev pango-dev gd-dev lua5.3-dev readline-dev
	libpng-dev libjpeg-turbo-dev"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/sourceforge/gnuplot/gnuplot-$pkgver.tar.gz"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-stats \
		--disable-wxwidgets \
		--disable-qt
	make
}

check() {
	make GNUTERM=dumb check
}

package() {
	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 BUGS NEWS PGPKEYS README* \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
fc35ab68a992acc8e35402c89cb7704c0efe117ec1fb272739d4378289d6c5a2e8f4b747b339fca916e559453547f2405863fb52038576883f0d5643a7220b5e  gnuplot-5.4.3.tar.gz
"
